package com.live.activity;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Receive the broadcast and start the activity that will show the alarm
 */
public class LiveReceiver extends BroadcastReceiver {

	/**
	 * called when the BroadcastReceiver is receiving an Intent broadcast.
	 */
	@Override
	public void onReceive(Context context, Intent intent) {
		System.out.println("收到广播");
		/* start another activity - MyAlarm to display the alarm */
		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		intent.setClass(context, MyAlarm.class);
		context.startActivity(intent);

	}

}